package com.zqxq.lottery.util;

import com.alibaba.fastjson.JSONObject;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;

/**
 * @author 苦智
 * @date 2018/4/16 16:35
 * @description 福彩3D奖金算法
 * @ClassName CalculatorFC
 */
@Slf4j
@Component
public class CalculatorFC extends Calculator {

    private static Object[] winningsList = {1040,346,346,173};

    @Override
    public String winInfo(int[] win, Integer betTimes) {
        return winInfo(win,winningsList,betTimes);
    }


    /**
     * @Author 苦智
     * @Description
     * @Date 17:44 2018/4/16
     * @Param [lotteryNum, bettingNum, lotteryId, playType] 开奖号码、投注号码、奖种、玩法
     * @return int[]
     **/
    @Override
    public int[] win(String lotteryNum, String bettingNum, String playType){
        return commonCalculation(lotteryNum,bettingNum,playType);
    }

    public static void main(String[] args) {
        int[] win = new CalculatorFC().win("1,1,2","1|2","2");
        System.out.println(JSONObject.toJSONString(win));
        System.out.println(new CalculatorFC().winInfo(win,1));
    }

}
